vcIfStatement

A vcIfStatement is a robot statement that execute one of two scopes of statements based on a condition. If the condition is true, the statement executes its ThenScope of statements. If the condition is false, the statement executes is ElseScope of statements. In robot programming, you can also add one or more ElseIfScopes (vcElseIfScope) between ThenScope and ElseScope.

See in: Overview

Module: vcRobotics

Parent: vcStatement

Children -

Referenced by: -

Properties

Learn how to use properties here. The properties are also inherited from the parent class.

NameTypeAccessDescription
ConditionStringRWDefines an expression that when evaluated returns a True or False value.
See more
A True value means the statement will execute its ThenScope of statements.

A False value means the statement will execute its ElseScope of statements.
ElseIfScopesvcListRGets a list of ElseIfScopes in the statement.
ElseScopevcScopeRGets the scope of statements executed by the statement if Condition is false.
ThenScopevcScopeRGets the scope of statements executed by the statement if Condition is true.

Methods

Learn how to use methods here. The methods are also inherited from the parent class.

NameReturn TypeParametersDescription
addElseIfScopevcElseIfScopeOptional Keyword[index = Integer]Adds vcElseIfScope to the statement and returns that scope.
See more
The default value of index is -1, so a new vcElseIfScope is inserted immediately before ElseScope

Parameters:
index (integer)

Returns:
vcElseIfScope
deleteElseIfScopeNonevcElseIfScope scopeDeletes given scope from the statement.

Parameters:
scope (vcElseIfScope): scope to be deleted